//
//  NSObject+Convenience.m
//  PCCategoriesDemo
//
//  Created by 宋鹏程 on 14-4-8.
//  Copyright (c) 2014年 宋鹏程. All rights reserved.
//

#import "NSObject+Convenience.h"

@implementation NSObject (Convenience)

- (BOOL)isNull
{
    return [self isEqual:[NSNull null]];
}

@end


@implementation NSObject (Model)

+ (instancetype)modelWithDictionary:(NSDictionary *)dict
{
    return [[self alloc] initWithDictionary:dict];
}

- (instancetype)initWithDictionary:(NSMutableDictionary *)dict
{
    self = [self init];
    if (self) {
        
    }
    return self;
}

+ (instancetype)modelWithDictionaryArray:(NSArray *)dictArray;
{
    return [[self alloc] initWithDictionaryArray:dictArray];
}

- (instancetype)initWithDictionaryArray:(NSArray *)dictArray
{
    self = [self init];
    if (self) {
        
    }
    return self;
}


+ (instancetype)modelWithAttributes:(NSDictionary *)dict
{
    return [[self alloc] initWithAttributes:dict];
}

- (instancetype)initWithAttributes:(NSDictionary *)dict
{
    self = [self init];
    if (self) {
        
    }
    return self;
}

+ (instancetype)modelWithAttributesArray:(NSArray *)dictArray;
{
    return [[self alloc] initWithAttributesArray:dictArray];
}

- (instancetype)initWithAttributesArray:(NSArray *)dictArray
{
    self = [self init];
    if (self) {
        
    }
    return self;
}

@end
